.class public Lcom/esfile/screen/recorder/videos/merge/a0;
.super Ljava/lang/Object;
.source "DuMerger.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/esfile/screen/recorder/videos/merge/a0$b;
    }
.end annotation


# instance fields
.field private a:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/esfile/screen/recorder/videos/merge/b0;",
            ">;"
        }
    .end annotation
.end field

.field private b:Lcom/esfile/screen/recorder/media/c;

.field private c:Lcom/esfile/screen/recorder/media/c$g;

.field private d:Lcom/esfile/screen/recorder/videos/merge/a0$b;


# direct methods
.method public constructor <init>(Ljava/util/List;)V
    .locals 1
    .param p1    # Ljava/util/List;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/esfile/screen/recorder/videos/merge/b0;",
            ">;)V"
        }
    .end annotation

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance v0, Lcom/esfile/screen/recorder/videos/merge/a0$a;

    invoke-direct {v0, p0}, Lcom/esfile/screen/recorder/videos/merge/a0$a;-><init>(Lcom/esfile/screen/recorder/videos/merge/a0;)V

    iput-object v0, p0, Lcom/esfile/screen/recorder/videos/merge/a0;->c:Lcom/esfile/screen/recorder/media/c$g;

    .line 3
    iput-object p1, p0, Lcom/esfile/screen/recorder/videos/merge/a0;->a:Ljava/util/List;

    return-void
.end method

.method private a(Ljava/lang/String;JJ)Lcom/esfile/screen/recorder/media/c$f;
    .locals 14

    move-object v11, p1

    .line 7
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    const/4 v12, 0x0

    if-nez v0, :cond_1

    new-instance v0, Ljava/io/File;

    invoke-direct {v0, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v0

    if-nez v0, :cond_0

    goto :goto_0

    .line 8
    :cond_0
    new-instance v13, Lcom/esfile/screen/recorder/media/c$f;

    const-wide/16 v0, 0x3e8

    mul-long v2, p2, v0

    mul-long v4, p4, v0

    const/high16 v6, 0x3f800000    # 1.0f

    const/4 v7, 0x0

    const/4 v8, 0x0

    const/4 v9, 0x1

    const/4 v10, 0x0

    move-object v0, v13

    move-object v1, p1

    invoke-direct/range {v0 .. v10}, Lcom/esfile/screen/recorder/media/c$f;-><init>(Ljava/lang/Object;JJFILandroid/graphics/RectF;ZLjava/util/List;)V

    const/16 v0, 0x10

    .line 9
    iput v0, v13, Lcom/esfile/screen/recorder/media/c$f;->b:I

    .line 10
    iput-object v11, v13, Lcom/esfile/screen/recorder/media/c$f;->a:Ljava/lang/Object;

    const/4 v0, 0x0

    .line 11
    iput-boolean v0, v13, Lcom/esfile/screen/recorder/media/c$f;->m:Z

    .line 12
    iput-boolean v0, v13, Lcom/esfile/screen/recorder/media/c$f;->n:Z

    .line 13
    sget-object v0, Lcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;->FIT_CENTER:Lcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;

    iput-object v0, v13, Lcom/esfile/screen/recorder/media/c$f;->o:Lcom/esfile/screen/recorder/media/util/ScaleTypeUtil$ScaleType;

    .line 14
    iput-object v12, v13, Lcom/esfile/screen/recorder/media/c$f;->l:Les/b8;

    return-object v13

    :cond_1
    :goto_0
    return-object v12
.end method

.method static synthetic a(Lcom/esfile/screen/recorder/videos/merge/a0;)Lcom/esfile/screen/recorder/videos/merge/a0$b;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/esfile/screen/recorder/videos/merge/a0;->d:Lcom/esfile/screen/recorder/videos/merge/a0$b;

    return-object p0
.end method

.method static synthetic a(Lcom/esfile/screen/recorder/videos/merge/a0;Ljava/lang/String;)V
    .locals 0

    .line 2
    invoke-direct {p0, p1}, Lcom/esfile/screen/recorder/videos/merge/a0;->a(Ljava/lang/String;)V

    return-void
.end method

.method private a(Ljava/lang/String;)V
    .locals 3

    .line 15
    new-instance v0, Ljava/io/File;

    invoke-direct {v0, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 16
    new-instance p1, Les/bd;

    invoke-direct {p1}, Les/bd;-><init>()V

    .line 17
    invoke-virtual {v0}, Ljava/io/File;->lastModified()J

    move-result-wide v1

    invoke-virtual {p1, v1, v2}, Les/bd;->a(J)V

    const/4 v1, 0x0

    .line 18
    :try_start_0
    invoke-static {v0, p1, v1}, Les/bd;->a(Ljava/io/File;Les/bd;Z)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    .line 19
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    :goto_0
    return-void
.end method

.method private a(Landroid/util/Pair;)Z
    .locals 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/util/Pair<",
            "Ljava/lang/Long;",
            "Ljava/lang/Long;",
            ">;)Z"
        }
    .end annotation

    if-eqz p1, :cond_0

    .line 6
    iget-object v0, p1, Landroid/util/Pair;->first:Ljava/lang/Object;

    if-eqz v0, :cond_0

    iget-object v1, p1, Landroid/util/Pair;->second:Ljava/lang/Object;

    if-eqz v1, :cond_0

    check-cast v0, Ljava/lang/Long;

    invoke-virtual {v0}, Ljava/lang/Long;->longValue()J

    move-result-wide v0

    iget-object p1, p1, Landroid/util/Pair;->second:Ljava/lang/Object;

    check-cast p1, Ljava/lang/Long;

    invoke-virtual {p1}, Ljava/lang/Long;->longValue()J

    move-result-wide v2

    cmp-long p1, v0, v2

    if-gtz p1, :cond_0

    const/4 p1, 0x1

    goto :goto_0

    :cond_0
    const/4 p1, 0x0

    :goto_0
    return p1
.end method

.method static synthetic b(Lcom/esfile/screen/recorder/videos/merge/a0;)Ljava/util/List;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/esfile/screen/recorder/videos/merge/a0;->a:Ljava/util/List;

    return-object p0
.end method

.method private c()Ljava/lang/String;
    .locals 5

    .line 1
    invoke-static {}, Les/qc$f;->a()Ljava/lang/String;

    move-result-object v0

    if-nez v0, :cond_0

    const/4 v0, 0x0

    return-object v0

    .line 2
    :cond_0
    new-instance v1, Ljava/text/SimpleDateFormat;

    const-string v2, "yyyyMMdd_HHmmss"

    invoke-direct {v1, v2}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    new-instance v2, Ljava/util/Date;

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v3

    invoke-direct {v2, v3, v4}, Ljava/util/Date;-><init>(J)V

    invoke-virtual {v1, v2}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v1

    .line 3
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    sget-object v0, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v0, "_es_edited"

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v0, ".mp4"

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method


# virtual methods
.method public a()V
    .locals 1

    .line 3
    iget-object v0, p0, Lcom/esfile/screen/recorder/videos/merge/a0;->b:Lcom/esfile/screen/recorder/media/c;

    if-eqz v0, :cond_0

    .line 4
    invoke-virtual {v0}, Lcom/esfile/screen/recorder/media/c;->a()V

    :cond_0
    const/4 v0, 0x0

    .line 5
    iput-object v0, p0, Lcom/esfile/screen/recorder/videos/merge/a0;->c:Lcom/esfile/screen/recorder/media/c$g;

    return-void
.end method

.method public a(Lcom/esfile/screen/recorder/videos/merge/a0$b;)V
    .locals 0

    .line 20
    iput-object p1, p0, Lcom/esfile/screen/recorder/videos/merge/a0;->d:Lcom/esfile/screen/recorder/videos/merge/a0$b;

    return-void
.end method

.method public b()V
    .locals 22
    .annotation build Landroidx/annotation/UiThread;
    .end annotation

    move-object/from16 v6, p0

    .line 2
    invoke-direct/range {p0 .. p0}, Lcom/esfile/screen/recorder/videos/merge/a0;->c()Ljava/lang/String;

    move-result-object v7

    if-nez v7, :cond_0

    .line 3
    sget v0, Les/z4;->durec_cut_video_no_space:I

    invoke-static {v0}, Les/ec;->a(I)V

    return-void

    .line 4
    :cond_0
    iget-object v0, v6, Lcom/esfile/screen/recorder/videos/merge/a0;->d:Lcom/esfile/screen/recorder/videos/merge/a0$b;

    if-eqz v0, :cond_1

    .line 5
    invoke-interface {v0}, Lcom/esfile/screen/recorder/videos/merge/a0$b;->a()V

    .line 6
    :cond_1
    iget-object v0, v6, Lcom/esfile/screen/recorder/videos/merge/a0;->b:Lcom/esfile/screen/recorder/media/c;

    if-nez v0, :cond_2

    .line 7
    new-instance v0, Lcom/esfile/screen/recorder/media/c;

    invoke-direct {v0}, Lcom/esfile/screen/recorder/media/c;-><init>()V

    iput-object v0, v6, Lcom/esfile/screen/recorder/videos/merge/a0;->b:Lcom/esfile/screen/recorder/media/c;

    .line 8
    iget-object v1, v6, Lcom/esfile/screen/recorder/videos/merge/a0;->c:Lcom/esfile/screen/recorder/media/c$g;

    invoke-virtual {v0, v1}, Lcom/esfile/screen/recorder/media/c;->a(Lcom/esfile/screen/recorder/media/c$g;)V

    .line 9
    :cond_2
    new-instance v8, Ljava/util/ArrayList;

    iget-object v0, v6, Lcom/esfile/screen/recorder/videos/merge/a0;->a:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    invoke-direct {v8, v0}, Ljava/util/ArrayList;-><init>(I)V

    .line 10
    iget-object v0, v6, Lcom/esfile/screen/recorder/videos/merge/a0;->a:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v9

    :cond_3
    :goto_0
    invoke-interface {v9}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_7

    invoke-interface {v9}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    move-object v10, v0

    check-cast v10, Lcom/esfile/screen/recorder/videos/merge/b0;

    .line 11
    invoke-virtual {v10}, Lcom/esfile/screen/recorder/videos/merge/b0;->e()Landroid/util/Pair;

    move-result-object v0

    invoke-direct {v6, v0}, Lcom/esfile/screen/recorder/videos/merge/a0;->a(Landroid/util/Pair;)Z

    move-result v0

    if-nez v0, :cond_4

    goto :goto_0

    .line 12
    :cond_4
    invoke-virtual {v10}, Lcom/esfile/screen/recorder/videos/merge/b0;->e()Landroid/util/Pair;

    move-result-object v0

    const/4 v1, 0x0

    .line 13
    invoke-virtual {v10}, Lcom/esfile/screen/recorder/videos/merge/b0;->i()Z

    move-result v2

    if-eqz v2, :cond_5

    .line 14
    invoke-virtual {v10}, Lcom/esfile/screen/recorder/videos/merge/b0;->d()Ljava/lang/String;

    move-result-object v1

    iget-object v2, v0, Landroid/util/Pair;->first:Ljava/lang/Object;

    check-cast v2, Ljava/lang/Long;

    invoke-virtual {v2}, Ljava/lang/Long;->longValue()J

    move-result-wide v2

    iget-object v0, v0, Landroid/util/Pair;->second:Ljava/lang/Object;

    check-cast v0, Ljava/lang/Long;

    invoke-virtual {v0}, Ljava/lang/Long;->longValue()J

    move-result-wide v4

    move-object/from16 v0, p0

    invoke-direct/range {v0 .. v5}, Lcom/esfile/screen/recorder/videos/merge/a0;->a(Ljava/lang/String;JJ)Lcom/esfile/screen/recorder/media/c$f;

    move-result-object v1

    goto :goto_1

    .line 15
    :cond_5
    invoke-virtual {v10}, Lcom/esfile/screen/recorder/videos/merge/b0;->j()Z

    move-result v2

    if-eqz v2, :cond_6

    .line 16
    new-instance v1, Lcom/esfile/screen/recorder/media/c$f;

    invoke-virtual {v10}, Lcom/esfile/screen/recorder/videos/merge/b0;->d()Ljava/lang/String;

    move-result-object v12

    iget-object v2, v0, Landroid/util/Pair;->first:Ljava/lang/Object;

    check-cast v2, Ljava/lang/Long;

    .line 17
    invoke-virtual {v2}, Ljava/lang/Long;->longValue()J

    move-result-wide v2

    const-wide/16 v4, 0x3e8

    mul-long v13, v2, v4

    iget-object v0, v0, Landroid/util/Pair;->second:Ljava/lang/Object;

    check-cast v0, Ljava/lang/Long;

    invoke-virtual {v0}, Ljava/lang/Long;->longValue()J

    move-result-wide v2

    mul-long v15, v2, v4

    const/high16 v17, 0x3f800000    # 1.0f

    const/16 v18, 0x0

    const/16 v19, 0x0

    const/16 v20, 0x0

    const/16 v21, 0x0

    move-object v11, v1

    invoke-direct/range {v11 .. v21}, Lcom/esfile/screen/recorder/media/c$f;-><init>(Ljava/lang/Object;JJFILandroid/graphics/RectF;ZLjava/util/List;)V

    :cond_6
    :goto_1
    if-eqz v1, :cond_3

    .line 18
    invoke-virtual {v10}, Lcom/esfile/screen/recorder/videos/merge/b0;->h()I

    move-result v0

    iput v0, v1, Lcom/esfile/screen/recorder/media/c$f;->f:I

    .line 19
    invoke-virtual {v10}, Lcom/esfile/screen/recorder/videos/merge/b0;->b()I

    move-result v0

    iput v0, v1, Lcom/esfile/screen/recorder/media/c$f;->g:I

    .line 20
    invoke-interface {v8, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 21
    :cond_7
    iget-object v0, v6, Lcom/esfile/screen/recorder/videos/merge/a0;->b:Lcom/esfile/screen/recorder/media/c;

    invoke-virtual {v0, v7, v8}, Lcom/esfile/screen/recorder/media/c;->a(Ljava/lang/String;Ljava/util/List;)I

    move-result v0

    const/4 v1, 0x1

    if-ne v0, v1, :cond_8

    .line 22
    iget-object v0, v6, Lcom/esfile/screen/recorder/videos/merge/a0;->d:Lcom/esfile/screen/recorder/videos/merge/a0$b;

    if-eqz v0, :cond_8

    .line 23
    new-instance v1, Ljava/io/FileNotFoundException;

    const-string v2, "File not found"

    invoke-direct {v1, v2}, Ljava/io/FileNotFoundException;-><init>(Ljava/lang/String;)V

    invoke-interface {v0, v1}, Lcom/esfile/screen/recorder/videos/merge/a0$b;->a(Ljava/lang/Exception;)V

    :cond_8
    return-void
.end method
